#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int fac(int n)
{
	int fact = 1;
	if (n == 0)
		return 1;
	else
	{
		
		for (int i = 1; i <= n; i++)
		{
			fact *= i;
		}
		return fact;
	}	

}


int main()
{
	int n = 0;
	while (scanf("%d", &n) != EOF)
	{
		int ret = fac(n);
		printf("%d", ret);
	}
	return 0;
}